package ar.com.vates.vsp.capitulo5.contenedor;

import java.util.Random;



public class Borrador extends Thread {
	
	
	
	    int elem;
	    Contenedor buffer;
	    Random rad=new Random();
	    
	    Borrador (Contenedor b){
	        buffer =b;
	       }
	    
	    
	       public void run(){
	           try{
	               for(int j=0;j<11;j++)
	            { Thread.sleep((int)(rad.nextDouble()*1500)); 
	            	   elem= buffer.extraer();
	            
	           
	            }
	            }catch(Exception e){}
	        return;
	    }
}
